package cn.lanca.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author meihongliang
 * @since 2023/3/6 15:57
 */
@Configuration
public class SwaggerConfig extends WebMvcConfigurationSupport {

    @Bean
    public OpenAPI getDefaultApi() {
        return new OpenAPI()
                .openapi("3.0.0")
                .info(new Info().title("sec-system系统API")
                        .description("sec-system系统A 发布的所有Rest接口列表")
                        .version("v1.0.0")
                        .termsOfService("http://www.lanca.com")
                        .contact(new Contact().name("lanca科技股份有限公司").url("http://www.lanca.com").email("support@lanca.com"))
                );
    }
}
